<head>
    <title>Crypto Test</title>
</head>
<head>
<style type="text/css">
#container {
    border-radius: 8px;
    padding: 10px;
    font-family:'Comic Sans MS';
    margin-left: auto;
    margin-right: auto;
    width:700px;
    box-shadow: 0 0 5px #000;
}
</style>
<body><div id="container">
    <script type="text/javascript">
        var control = "abcdefghijklmnopqrstuvwxyz, ABCDEFGHIJKLMNOPQRSTUVWXYZ.-1234567890=_+@!()";
        var key1    = "(2nd_Z-Day Plot!)bcefghijkmpqrsuvwxz,ABCEFGHIJKLMNOQRSTUVWXY.134567890=+@";
        var key2    = ")(ectiC DAY.abdfghjklmnopqrsuvwxyz,BEFGHIJKLMNOPQRSTUVWXZ-1234567890=_+@!";
        
        document.write( control.length + ", " + key1.length + ", " + key2.length + "<br>");
        
        var testString = "Iris Lanser";
        var passString = "";
        var crypString = "";
        
        var i;
        
        for (i = 0; i < testString.length; i++) {
            document.write( control.indexOf(testString[i]) );
            if (control.indexOf(testString[i]) == -1)
                crypString += testString[i];
            
            else {
                passString += key1[control.indexOf(testString[i])];
            
                if ( i % 2 == 0 )
                    crypString += key2[control.indexOf(passString[i])] + passString[passString.length - (i + 1)];
                else if ( i % 3 == 0 )
                    crypString += key2[control.indexOf(passString[i])] + passString[i];
                if ( i % 5 == 0 )
                    crypString += key2[control.indexOf(testString[testString.length - (i + 1)])] + passString[i];
            }
        }
        
        document.write( "<br>Original : " + testString );
        document.write( "<br>Level 1 &nbsp;: " + passString );
        document.write( "<br>Level 2 &nbsp;: " + crypString );
        addtext( crypText );
    </script></div>
</body>
